package springboot.com.elasticsearch.serviceImpl;

import org.springframework.beans.factory.annotation.Autowired;

import springboot.com.elasticsearch.bean.Demo;
import springboot.com.elasticsearch.repository.DemoEsRepository;

public class DemoServiceEsImpl implements DemoServiceEs  {
	
	@Autowired
	private DemoEsRepository demoEsRepository;

	@Override
	public void save(Demo demo) {
		demoEsRepository.save(demo);
	}

	@Override
	public Iterable<Demo> findAll() {
		return demoEsRepository.findAll();
	}

}
